/*
 * TecladoEnPantalla.java
 *
 * Created on 17 de mayo de 2008, 10:48 AM
 */
package instalador;

import java.awt.Dialog.ModalExclusionType;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.JButton;

/**
 *
 * @author  Yohan
 */
public class TecladoEnPantalla extends javax.swing.JFrame {

    private static TecladoEnPantalla teclado = new TecladoEnPantalla();
    private static Robot robot;

    private TecladoEnPantalla() {
        initComponents();
        Ventana.centrar(this);
        ImageIcon icono = new ImageIcon("src/presentacion/vista/iconoTeclado.png");
        setIconImage(icono.getImage());
        try {
            robot = new Robot();
        } catch (Exception e) {
            System.out.println("Error al crear el robot");
        }

        //Toolkit.getDefaultToolkit().setLockingKeyState(KeyEvent.VK_CAPS_LOCK, false);
    }

    public static void mostrar() {
        teclado.setVisible(true);
    }

    public static void ocultar() {
        teclado.setVisible(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        n1 = new javax.swing.JButton();
        n2 = new javax.swing.JButton();
        n3 = new javax.swing.JButton();
        n4 = new javax.swing.JButton();
        n5 = new javax.swing.JButton();
        n6 = new javax.swing.JButton();
        n7 = new javax.swing.JButton();
        n8 = new javax.swing.JButton();
        n9 = new javax.swing.JButton();
        n0 = new javax.swing.JButton();
        Q = new javax.swing.JButton();
        W = new javax.swing.JButton();
        E = new javax.swing.JButton();
        R = new javax.swing.JButton();
        T = new javax.swing.JButton();
        Y = new javax.swing.JButton();
        U = new javax.swing.JButton();
        I = new javax.swing.JButton();
        O = new javax.swing.JButton();
        P = new javax.swing.JButton();
        A = new javax.swing.JButton();
        S = new javax.swing.JButton();
        D = new javax.swing.JButton();
        F = new javax.swing.JButton();
        G = new javax.swing.JButton();
        H = new javax.swing.JButton();
        J = new javax.swing.JButton();
        K = new javax.swing.JButton();
        L = new javax.swing.JButton();
        Ñ = new javax.swing.JButton();
        Z = new javax.swing.JButton();
        X = new javax.swing.JButton();
        C = new javax.swing.JButton();
        V = new javax.swing.JButton();
        B = new javax.swing.JButton();
        N = new javax.swing.JButton();
        M = new javax.swing.JButton();
        escape = new javax.swing.JButton();
        tab = new javax.swing.JButton();
        bloqMayus = new javax.swing.JToggleButton();
        shift = new javax.swing.JToggleButton();
        parentesisIzq = new javax.swing.JButton();
        parentesisDer = new javax.swing.JButton();
        control = new javax.swing.JButton();
        windows = new javax.swing.JButton();
        alt = new javax.swing.JButton();
        space = new javax.swing.JButton();
        inicio = new javax.swing.JButton();
        fin = new javax.swing.JButton();
        arriba = new javax.swing.JButton();
        abajo = new javax.swing.JButton();
        izquierda = new javax.swing.JButton();
        derecha = new javax.swing.JButton();
        enter = new javax.swing.JButton();
        backSpace = new javax.swing.JButton();
        suprimir = new javax.swing.JButton();
        jButton54 = new javax.swing.JButton();

        setTitle("Teclado en pantalla");
        setAlwaysOnTop(true);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setFocusable(false);
        setFocusableWindowState(false);
        setModalExclusionType(ModalExclusionType.TOOLKIT_EXCLUDE);
        setResizable(false);
        addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                formKeyTyped(evt);
            }
        });

        n1.setText("1");
        n1.setFocusPainted(false);
        n1.setFocusable(false);
        n1.setName(String.valueOf(KeyEvent.VK_NUMPAD1));
        n1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n2.setText("2");
        n2.setFocusPainted(false);
        n2.setFocusable(false);
        n2.setName(String.valueOf(KeyEvent.VK_NUMPAD2));
        n2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n3.setText("3");
        n3.setFocusPainted(false);
        n3.setFocusable(false);
        n3.setName(String.valueOf(KeyEvent.VK_NUMPAD3));
        n3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n4.setText("4");
        n4.setFocusPainted(false);
        n4.setFocusable(false);
        n4.setName(String.valueOf(KeyEvent.VK_NUMPAD4));
        n4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n5.setText("5");
        n5.setFocusPainted(false);
        n5.setFocusable(false);
        n5.setName(String.valueOf(KeyEvent.VK_NUMPAD5));
        n5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n6.setText("6");
        n6.setFocusPainted(false);
        n6.setFocusable(false);
        n6.setName(String.valueOf(KeyEvent.VK_NUMPAD6));
        n6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n7.setText("7");
        n7.setFocusPainted(false);
        n7.setFocusable(false);
        n7.setName(String.valueOf(KeyEvent.VK_NUMPAD7));
        n7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n8.setText("8");
        n8.setFocusPainted(false);
        n8.setFocusable(false);
        n8.setName(String.valueOf(KeyEvent.VK_NUMPAD8));
        n8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n9.setText("9");
        n9.setFocusPainted(false);
        n9.setFocusable(false);
        n9.setName(String.valueOf(KeyEvent.VK_NUMPAD9));
        n9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        n0.setText("0");
        n0.setFocusPainted(false);
        n0.setFocusable(false);
        n0.setName(String.valueOf(KeyEvent.VK_NUMPAD0));
        n0.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        Q.setText("Q");
        Q.setFocusPainted(false);
        Q.setFocusable(false);
        Q.setName(String.valueOf(KeyEvent.VK_Q));
        Q.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        W.setText("W");
        W.setFocusPainted(false);
        W.setFocusable(false);
        W.setName(String.valueOf(KeyEvent.VK_W));
        W.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        E.setText("E");
        E.setFocusPainted(false);
        E.setFocusable(false);
        E.setName(String.valueOf(KeyEvent.VK_E));
        E.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        R.setText("R");
        R.setFocusPainted(false);
        R.setFocusable(false);
        R.setName(String.valueOf(KeyEvent.VK_R));
        R.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        T.setText("T");
        T.setFocusPainted(false);
        T.setFocusable(false);
        T.setName(String.valueOf(KeyEvent.VK_T));
        T.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        Y.setText("Y");
        Y.setFocusPainted(false);
        Y.setFocusable(false);
        Y.setName(String.valueOf(KeyEvent.VK_Y));
        Y.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        U.setText("U");
        U.setFocusPainted(false);
        U.setFocusable(false);
        U.setName(String.valueOf(KeyEvent.VK_U));
        U.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        I.setText("I");
        I.setFocusPainted(false);
        I.setFocusable(false);
        I.setName(String.valueOf(KeyEvent.VK_I));
        I.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        O.setText("O");
        O.setFocusPainted(false);
        O.setFocusable(false);
        O.setName(String.valueOf(KeyEvent.VK_O));
        O.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        P.setText("P");
        P.setFocusPainted(false);
        P.setFocusable(false);
        P.setName(String.valueOf(KeyEvent.VK_P));
        P.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        A.setText("A");
        A.setFocusPainted(false);
        A.setFocusable(false);
        A.setName(String.valueOf(KeyEvent.VK_A));
        A.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        S.setText("S");
        S.setFocusPainted(false);
        S.setFocusable(false);
        S.setName(String.valueOf(KeyEvent.VK_S));
        S.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        D.setText("D");
        D.setFocusPainted(false);
        D.setFocusable(false);
        D.setName(String.valueOf(KeyEvent.VK_D));
        D.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        F.setText("F");
        F.setFocusPainted(false);
        F.setFocusable(false);
        F.setName(String.valueOf(KeyEvent.VK_F));
        F.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        G.setText("G");
        G.setFocusPainted(false);
        G.setFocusable(false);
        G.setName(String.valueOf(KeyEvent.VK_G));
        G.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        H.setText("H");
        H.setFocusPainted(false);
        H.setFocusable(false);
        H.setName(String.valueOf(KeyEvent.VK_H));
        H.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        J.setText("J");
        J.setFocusPainted(false);
        J.setFocusable(false);
        J.setName(String.valueOf(KeyEvent.VK_J));
        J.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        K.setText("K");
        K.setFocusPainted(false);
        K.setFocusable(false);
        K.setName(String.valueOf(KeyEvent.VK_K));
        K.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        L.setText("L");
        L.setFocusPainted(false);
        L.setFocusable(false);
        L.setName(String.valueOf(KeyEvent.VK_L));
        L.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        Ñ.setText("Ñ");
        Ñ.setFocusPainted(false);
        Ñ.setFocusable(false);
        Ñ.setName(String.valueOf(KeyEvent.VK_N));
        Ñ.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        Z.setText("Z");
        Z.setFocusPainted(false);
        Z.setFocusable(false);
        Z.setName(String.valueOf(KeyEvent.VK_Z));
        Z.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        X.setText("X");
        X.setFocusPainted(false);
        X.setFocusable(false);
        X.setName(String.valueOf(KeyEvent.VK_X));
        X.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        C.setText("C");
        C.setFocusPainted(false);
        C.setFocusable(false);
        C.setName(String.valueOf(KeyEvent.VK_C));
        C.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        V.setText("V");
        V.setFocusPainted(false);
        V.setFocusable(false);
        V.setName(String.valueOf(KeyEvent.VK_V));
        V.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        B.setText("B");
        B.setFocusPainted(false);
        B.setFocusable(false);
        B.setName(String.valueOf(KeyEvent.VK_B));
        B.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        N.setText("N");
        N.setFocusPainted(false);
        N.setFocusable(false);
        N.setName(String.valueOf(KeyEvent.VK_N));
        N.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        M.setText("M");
        M.setFocusPainted(false);
        M.setFocusable(false);
        M.setName(String.valueOf(KeyEvent.VK_M));
        M.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        escape.setText("Esc");
        escape.setFocusPainted(false);
        escape.setFocusable(false);
        escape.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        escape.setMargin(new java.awt.Insets(2, 10, 2, 10));
        escape.setName(String.valueOf(KeyEvent.VK_ESCAPE));
        escape.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        tab.setText("Tab");
        tab.setFocusPainted(false);
        tab.setFocusable(false);
        tab.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        tab.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        tab.setMargin(new java.awt.Insets(2, 10, 2, 14));
        tab.setName(String.valueOf(KeyEvent.VK_TAB));
        tab.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        bloqMayus.setText("Bloq. Mayús");
        bloqMayus.setFocusPainted(false);
        bloqMayus.setFocusable(false);
        bloqMayus.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        bloqMayus.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        bloqMayus.setMargin(new java.awt.Insets(2, 10, 2, 14));
        bloqMayus.setName(String.valueOf(KeyEvent.VK_WINDOWS));
        bloqMayus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bloqMayusActionPerformed(evt);
            }
        });

        shift.setText("Shift");
        shift.setFocusPainted(false);
        shift.setFocusable(false);
        shift.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        shift.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        shift.setMargin(new java.awt.Insets(2, 10, 2, 14));
        shift.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                shiftActionPerformed(evt);
            }
        });

        parentesisIzq.setText("(");
        parentesisIzq.setFocusPainted(false);
        parentesisIzq.setFocusable(false);
        parentesisIzq.setMargin(new java.awt.Insets(2, 10, 2, 10));
        parentesisIzq.setName(String.valueOf(KeyEvent.VK_LEFT_PARENTHESIS));
        parentesisIzq.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        parentesisDer.setText(")");
        parentesisDer.setFocusPainted(false);
        parentesisDer.setFocusable(false);
        parentesisDer.setName(String.valueOf(KeyEvent.VK_RIGHT_PARENTHESIS));
        parentesisDer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        control.setText("Ctrl");
        control.setEnabled(false);
        control.setFocusPainted(false);
        control.setFocusable(false);
        control.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        control.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        control.setMargin(new java.awt.Insets(2, 10, 2, 14));

        windows.setText("Help");
        windows.setEnabled(false);
        windows.setFocusPainted(false);
        windows.setFocusable(false);
        windows.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        windows.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        windows.setMargin(new java.awt.Insets(2, 10, 2, 14));

        alt.setText("Alt");
        alt.setEnabled(false);
        alt.setFocusPainted(false);
        alt.setFocusable(false);
        alt.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        alt.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        alt.setMargin(new java.awt.Insets(2, 10, 2, 14));

        space.setText(" ");
        space.setFocusPainted(false);
        space.setFocusable(false);
        space.setName(String.valueOf(KeyEvent.VK_SPACE));
        space.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        inicio.setText("Inicio");
        inicio.setFocusPainted(false);
        inicio.setFocusable(false);
        inicio.setMargin(new java.awt.Insets(1, 1, 1, 1));
        inicio.setName(String.valueOf(KeyEvent.VK_HOME));
        inicio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        fin.setText("Fin");
        fin.setFocusPainted(false);
        fin.setFocusable(false);
        fin.setMargin(new java.awt.Insets(1, 1, 1, 1));
        fin.setName(String.valueOf(KeyEvent.VK_END));
        fin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        arriba.setFont(new java.awt.Font("Arial", 0, 11));
        arriba.setText("▲");
        arriba.setFocusPainted(false);
        arriba.setFocusable(false);
        arriba.setMargin(new java.awt.Insets(1, 1, 1, 1));
        arriba.setName(String.valueOf(KeyEvent.VK_UP));
        arriba.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        abajo.setFont(new java.awt.Font("Arial", 0, 11));
        abajo.setText("▼");
        abajo.setFocusPainted(false);
        abajo.setFocusable(false);
        abajo.setMargin(new java.awt.Insets(1, 1, 1, 1));
        abajo.setName(String.valueOf(KeyEvent.VK_DOWN));
        abajo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        izquierda.setFont(new java.awt.Font("Arial", 0, 11));
        izquierda.setText("◄");
        izquierda.setFocusPainted(false);
        izquierda.setFocusable(false);
        izquierda.setMargin(new java.awt.Insets(1, 1, 1, 1));
        izquierda.setName(String.valueOf(KeyEvent.VK_LEFT));
        izquierda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        derecha.setFont(new java.awt.Font("Arial", 0, 11));
        derecha.setText("►");
        derecha.setFocusPainted(false);
        derecha.setFocusable(false);
        derecha.setMargin(new java.awt.Insets(1, 1, 1, 1));
        derecha.setName(String.valueOf(KeyEvent.VK_RIGHT));
        derecha.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        enter.setText("Enter");
        enter.setFocusPainted(false);
        enter.setFocusable(false);
        enter.setName(String.valueOf(KeyEvent.VK_ENTER));
        enter.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        backSpace.setText("Backspace");
        backSpace.setFocusPainted(false);
        backSpace.setFocusable(false);
        backSpace.setName(String.valueOf(KeyEvent.VK_BACK_SPACE));
        backSpace.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        suprimir.setText("Supr");
        suprimir.setFocusPainted(false);
        suprimir.setFocusable(false);
        suprimir.setName(String.valueOf(KeyEvent.VK_DELETE));
        suprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        jButton54.setText(".");
        jButton54.setFocusPainted(false);
        jButton54.setFocusable(false);
        jButton54.setName(String.valueOf(KeyEvent.VK_PERIOD));
        jButton54.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                oprimirTeclaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(escape, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n6, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n8, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n9, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(n0, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton54, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(suprimir, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(tab, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(Q, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(W, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(E, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(R, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(T, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(Y, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(U, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(I, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(O, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(P, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(backSpace, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(bloqMayus, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(A, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(S, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(D, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(F, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(G, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(H, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(J, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(K, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(L, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(Ñ, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(enter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(control, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(windows, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(alt, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(space, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(shift, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(parentesisIzq, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(Z, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(X, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(C, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(V, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(B, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(N, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(M, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(parentesisDer, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(izquierda, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(abajo, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(derecha, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(inicio, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(arriba, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(fin, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(escape, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n6, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n8, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n9, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(n0, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton54, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(suprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Q, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tab, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(W, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(E, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(R, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(T, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Y, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(U, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(I, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(O, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(P, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(backSpace, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bloqMayus, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(A, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(S, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(D, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(F, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(G, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(H, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(J, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(K, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(L, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Ñ, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(enter, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(parentesisIzq, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Z, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(X, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(C, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(V, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(B, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(N, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(M, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(parentesisDer, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(inicio, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(shift, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(arriba, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fin, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(control, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(windows, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(alt, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(izquierda, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(abajo, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(derecha, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(space, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {inicio, izquierda});

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void oprimirTeclaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_oprimirTeclaActionPerformed
        JButton boton = (JButton) evt.getSource();
        int key = Integer.parseInt(boton.getName());
        if (key == KeyEvent.VK_LEFT_PARENTHESIS) {
            robot.keyPress(KeyEvent.VK_SHIFT);
            key = KeyEvent.VK_8;
        }

        if (key == KeyEvent.VK_RIGHT_PARENTHESIS) {
            robot.keyPress(KeyEvent.VK_SHIFT);
            key = KeyEvent.VK_9;
        }

        robot.keyPress(key);
        robot.keyRelease(key);

        if (key != KeyEvent.VK_UP && key != KeyEvent.VK_DOWN && key != KeyEvent.VK_LEFT && key != KeyEvent.VK_RIGHT) {
            robot.keyRelease(KeyEvent.VK_SHIFT);
            shift.setSelected(false);
        }
}//GEN-LAST:event_oprimirTeclaActionPerformed

    private void shiftActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shiftActionPerformed
        if (shift.isSelected()) {
            robot.keyPress(KeyEvent.VK_SHIFT);
        } else {
            robot.keyRelease(KeyEvent.VK_SHIFT);
        }
    }//GEN-LAST:event_shiftActionPerformed

    private void bloqMayusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bloqMayusActionPerformed
        robot.keyPress(KeyEvent.VK_CAPS_LOCK);
        robot.keyRelease(KeyEvent.VK_CAPS_LOCK);
    }//GEN-LAST:event_bloqMayusActionPerformed

    private void formKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyTyped
        System.out.println("hola");
    }//GEN-LAST:event_formKeyTyped

    public static void main(String args[]) {
        mostrar();
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton A;
    private javax.swing.JButton B;
    private javax.swing.JButton C;
    private javax.swing.JButton D;
    private javax.swing.JButton E;
    private javax.swing.JButton F;
    private javax.swing.JButton G;
    private javax.swing.JButton H;
    private javax.swing.JButton I;
    private javax.swing.JButton J;
    private javax.swing.JButton K;
    private javax.swing.JButton L;
    private javax.swing.JButton M;
    private javax.swing.JButton N;
    private javax.swing.JButton O;
    private javax.swing.JButton P;
    private javax.swing.JButton Q;
    private javax.swing.JButton R;
    private javax.swing.JButton S;
    private javax.swing.JButton T;
    private javax.swing.JButton U;
    private javax.swing.JButton V;
    private javax.swing.JButton W;
    private javax.swing.JButton X;
    private javax.swing.JButton Y;
    private javax.swing.JButton Z;
    private javax.swing.JButton abajo;
    private javax.swing.JButton alt;
    private javax.swing.JButton arriba;
    private javax.swing.JButton backSpace;
    private javax.swing.JToggleButton bloqMayus;
    private javax.swing.JButton control;
    private javax.swing.JButton derecha;
    private javax.swing.JButton enter;
    private javax.swing.JButton escape;
    private javax.swing.JButton fin;
    private javax.swing.JButton inicio;
    private javax.swing.JButton izquierda;
    private javax.swing.JButton jButton54;
    private javax.swing.JButton n0;
    private javax.swing.JButton n1;
    private javax.swing.JButton n2;
    private javax.swing.JButton n3;
    private javax.swing.JButton n4;
    private javax.swing.JButton n5;
    private javax.swing.JButton n6;
    private javax.swing.JButton n7;
    private javax.swing.JButton n8;
    private javax.swing.JButton n9;
    private javax.swing.JButton parentesisDer;
    private javax.swing.JButton parentesisIzq;
    private javax.swing.JToggleButton shift;
    private javax.swing.JButton space;
    private javax.swing.JButton suprimir;
    private javax.swing.JButton tab;
    private javax.swing.JButton windows;
    private javax.swing.JButton Ñ;
    // End of variables declaration//GEN-END:variables
}
